<?php

namespace App\Service\System;

use DB;

class RegisterCodeService
{
    public static function getRegisterCode($code)
    {
        $result = DB::table('lsj_register_code')->where(['code'=>$code, 'status'=>0])
            ->first();
        return $result;
    }

    public static function updCodeStatus($code,$identifyid)
    {
        $result = DB::table('lsj_register_code')->where('code',$code)
            ->update(['status'=>1,'identifyid'=>$identifyid]);
        return $result;
    }

    public static function  getRegisterCodeId($code,$string)
    {
        $result = DB::table('lsj_register_code')->where(['code'=>$code, 'identifyid'=>$string])
            ->first();
        return $result;
    }
}